package com.gopay.common.constants.microdone;

/**
 * 微通密码控件场景
 * @author <a href="mailto:yhwpeng@126.com">wangdong</a>
 * code 四位编码说明：
 * 第一位+第二位：项目编号，01、portal；02、网关
 * 第三位+第四位：具体场景
 * @date 2017-01-09 14:14:11
 */
public enum EnumMicroScene {

    PORTAL_GOPAY_LOGIN("0101","国付宝portal登陆"),
    PORTAL_GOPAY_PER_SMS_LOGIN("0103","国付宝portal短信登陆"),
    PORTAL_GOPAY_WITHDRAW("0104","国付宝portal提现"),
    PORTAL_GOPAY_WITHDRAW_AUTO_OPEN("0105","国付宝portal开通自动提现"),
    PORTAL_GOPAY_WITHDRAW_AUTO_CLOSE("0106","国付宝portal关闭自动提现"),
    PORTAL_GOPAY_PER_DEL_BINDCARD("0107","国付宝portal个人删除绑定银行卡"),
    PORTAL_GOPAY_INNER_TRANS("0108","国付宝portal企业/个人内部资金划转"),
    PORTAL_GOPAY_PER_PAY_TO_GOPAY("0109","国付宝portal个人付款到国付宝"),
    PORTAL_GOPAY_CORP_PAY_AUDIT("0110","国付宝portal企业付款审核"),
    PORTAL_GOPAY_CORP_MER_ORDER_QUERY_REFUND("0111","国付宝portal企业订单查询中退款"),
    PORTAL_GOPAY_CORP_BATCH_REFUND("0112","国付宝portal企业批量退款"),
    PORTAL_GOPAY_CORP_TRANSFER_REFUND("0113","国付宝portal航空商户退款转账"),
    PORTAL_GOPAY_PER_BATCH_PAY_TO_GOPAY("0114","国付宝portal个人批量付款到国付宝"),


    PORTAL_GOPAY_SECURITY_LOGIN_PWD_UPDATE("0131","国付宝portal修改登录密码"),
    PORTAL_GOPAY_SECURITY_LOGIN_QUESTION("0132","国付宝portal修改登录安全问题"),
    PORTAL_GOPAY_SECURITY_PAY_PWD_UPDATE("0133","国付宝portal修改支付密码"),
    PORTAL_GOPAY_SECURITY_PAY_QUESTION("0134","国付宝portal修改支付安全问题"),
    PORTAL_GOPAY_SECURITY_NOTIFY_ADDRESS("0135","国付宝portal设置付款通知地址"),
    PORTAL_GOPAY_SECURITY_SMS_VERIFY_OFF("0136","国付宝portal关闭短信验证"),
    PORTAL_GOPAY_SECURITY_SMS_VERIFY_ON("0137","国付宝portal开启短信验证"),
    PORTAL_GOPAY_SECURITY_CA_CERT_ON("0138","国付宝portal开启数字证书"),
    PORTAL_GOPAY_SECURITY_CA_CERT_OFF("0139","国付宝portal关闭数字证书"),
    PORTAL_GOPAY_SECURITY_TOKEN_ON("0140","国付宝portal开启动态口令卡"),
	PORTAL_GOPAY_SECURITY_TOKEN_OFF("0141","国付宝portal关闭动态口令卡"),
	PORTAL_GOPAY_SECURITY_CA_CERT_BUY("0142","国付宝portal购买数字证书"),
	PORTAL_GOPAY_SECURITY_CA_CERT_CORP_INSTALL("0143","国付宝portal企业用户首次开启或安装数字证书"),
	PORTAL_GOPAY_SECURITY_CA_CERT_PERSON_INSTALL("0144","国付宝portal个人用户安装数字证书"),
	PORTAL_GOPAY_SECURITY_CA_CERT_CANCEL("0145","国付宝portal注销数字证书"),
	PORTAL_GOPAY_SECURITY_CA_CERT_UPDATE("0146","国付宝portal更新数字证书"),
	PORTAL_GOPAY_CBRMB_INNER_DRAW("0147","国付宝跨境portal境内提现"),
	PORTAL_GOPAY_CBRMB_OUTER_DRAW("0148","国付宝跨境portal境外提现"),
	PORTAL_GOPAY_CBRMB_REFUND("0149","国付宝跨境portal退款"),
	PORTAL_GOPAY_CBRMB_BATCH_REFUND("0150","国付宝跨境portal批量退款"),
	PORTAL_GOPAY_SECURITY_LOGIN_PWD_FORGET("0151","国付宝portal忘记登录密码"),
	PORTAL_GOPAY_SECURITY_OPEN_MSG_SIGN("0152","国付宝portal开启服务器签名证书"),
	PORTAL_GOPAY_SECURITY_DOWNLOAD_MSG_SIGN("0153","国付宝portal下载服务器签名证书"),
	PORTAL_GOPAY_SECURITY_CHANGE_MSG_SIGN("0154","国付宝portal更换服务器签名证书"),
	PORTAL_GOPAY_SECURITY_RENEW_MSG_SIGN("0155","国付宝portal更新服务器签名证书"),
	PORTAL_GOPAY_SECURITY_RESET_PAY_PASSWORD("0156","国付宝portal找回支付密码"),
	PORTAL_GOPAY_SECURITY_SET_FREE_QUOTA("0157","国付宝portal设置账户免验证限额"),
	PORTAL_GOPAY_SECURITY_SET_PAY_PASSWORD("0158","国付宝portal企业用户首次登陆设置支付密码"),
	PORTAL_GOPAY_SECURITY_ADD_OPERATOR("0159","国付宝portal新建操作员"),
	PORTAL_GOPAY_INTLCARD_PROTEST("0160","国付宝外卡拒付portal申诉"),
//	PORTAL_GOPAY_CORP_REGISTER("0161","国付宝portal企业用户注册"),

	CASHIER_LOGIN("0201","收银台账户支付登陆"),
	CASHIER_BALANCE_PAY("0202","收银台余额支付"),
	CASHIER_EXPRESS_PAY("0203","收银台快捷支付二次支付"),

	CBRMB_CASHIER_LOGIN("0301","跨境收银台账户支付登陆"),
	CBRMB_CASHIER_BALANCE_PAY("0302","跨境收银台余额支付"),
	CBRMB_CASHIER_EXPRESS_PAY("0303","跨境收银台快捷支付二次支付"),

	CLOUDAT_CHANGE_PASSWORD("0401","云账户修改密码"),
	CLOUDAT_FIND_PASSWORD("0402","云账户修改提示问题"),
	CLOUDAT_WITHDRAW("0403","云账户提现"),
	CLOUDAT_CASHIER_BALANCE_PAY("0404","云账户网关账户支付"),
	CLOUDAT_RESET_PASSWORD("0405","云账户忘记密码"),
	CLOUDAT_BALANCE_PAY("0406","云账户收银台余额支付"),
	CLOUDAT_EXPRESS_PAY("0407","云账户收银台快捷支付二次支付"),

	AUTH_LOGIN("0501","AUTH主动登陆登陆"),

	CONSOLE_AUTH_LOGIN("0601","AUTH-CONSOLE主动登录"),
	CONSOLE_FRAUD_PLATFORM_LOGIN("0602","反欺诈后台管理平台登录"),
	CONSOLE_RCS_PLATFORM_LOGIN("0603","反洗钱后台管理平台登录"),
	CONSOLE_ADMIN_LOGIN("0604","控制台后台管理平台登录"),

	FUNDC_PURCHASE("0701","理财转入"),
	FUNDC_TRANSFER("0702","理财转出")
	;

	private final String code;
	private final String desc;

	EnumMicroScene(String code, String desc){
		this.code = code;
		this.desc = desc;
	}

	/**
	 * 根据编码获取描述
	 * @author <a href="mailto:yhwpeng@126.com">wangdong</a>
	 * @date 2017-04-27 15:19:05
	 */
	public static String getValueByCode(String code){
		if (code ==null || "".equals(code)){
			return  "";
		}
		for (EnumMicroScene each : values()){
			if (code.equalsIgnoreCase(each.getCode())){
				return each.getDesc();
			}
		}
		return "";
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
}
